﻿/*
    Write a program that enters 3 integers n, min and max (min != max) and prints n random numbers in the range
    [min...max].
 */


using System;

class RandomNumbersInGivenRange
{
    static void Main()
    {
        int n;
        int min;
        int max;


        Console.WriteLine("Enter number for min range: ");
        min = int.Parse(Console.ReadLine());

        Console.WriteLine("Enter number for max range: ");
        max = int.Parse(Console.ReadLine());

        Console.WriteLine("Enter N: ");
        n = int.Parse(Console.ReadLine());
        Random randomNumbers = new Random();    //generate random numbers

        while (n <= 0)
        {
            Console.WriteLine("N MUST be > 0");
            n = int.Parse(Console.ReadLine());
        }

        for (int i = 0; i < n; i++)
        {
            Console.Write("{0,3}", randomNumbers.Next(min, max)); //print numbers between min range and max range
        }
        Console.WriteLine();



    }
}
